import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/icon/iconfont.css'
import 'amfe-flexible'
import './assets/css/common.css'
import {
  Button,
  Tabbar,
  TabbarItem,
  Icon,
  Swipe,
  SwipeItem,
  Grid,
  GridItem,
  NavBar,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Card,
  SubmitBar,
  Checkbox,
  SwipeCell,
  Toast,
  Popup,
  Form,
  Field,
  ContactCard,
  AddressEdit,
  AddressList,
  Search
} from 'vant'

// 自定义插件
import loading from './Plugins/Loading'

import vueLazyLoad from 'vue-lazyload'

Vue.use(loading)

// 引入图片资源 使用require
Vue.use(vueLazyLoad, {
  // loading: require('@/assets/img/loading.gif')
  loading: '/loading.gif'
})

Vue.use(Button)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Card)
  .use(SubmitBar)
  .use(Checkbox)
  .use(SwipeCell)
  .use(Toast)
  .use(Popup)
  .use(Form)
  .use(Field)
  .use(ContactCard)
  .use(AddressEdit)
  .use(AddressList)
  .use(Search)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
